#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <stddef.h>

struct S1 {
	double* d;
	char c;
	int i;
};
struct S2 {
	char c1;
	struct S1 s1;
	double d;
};

int main() {
	printf("%d\n", sizeof(struct S1));//16
	printf("%d\n", offsetof(struct S1, d));//0
	printf("%d\n", offsetof(struct S1, c));//8
	printf("%d\n", offsetof(struct S1, i));//12


	printf("%d\n", sizeof(struct S2));//32
	printf("%d\n", offsetof(struct S2, c1));//0
	printf("%d\n", offsetof(struct S2, s1));//8
	printf("%d\n", offsetof(struct S2, d));//24
	return 0;
}
